package com.operation;

import com.operation.utils.RequestPageUtil;

import java.util.Scanner;

public class GlobalArgument {

    public static long JobStartAddress=0;
    public static long JobEndAddress=319;
    public static int pageSize=10;//每一页存放的指令
    public static int memorySize=4;//内存块数
    public static int pageReferenceNumber=20;//页面引用串数量
    public static int[]pages=new int[]{7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1};//页面引用串
    public static long []address=new long[]{0,1,2,3,7,8,11,34,42,117,198,200,123,143,59,200,312,318,167,319};//物理地址

    /**
     * 接收用户自定义测试数据
     */
    public static void input(){
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入作业起始地址：");
        JobStartAddress=scanner.nextLong();
        System.out.println("输入作业结束地址：");
        JobEndAddress=scanner.nextLong();
        System.out.println("每一页存放的指令：");
        pageSize=scanner.nextInt();
        System.out.println("输入内存块数");
        memorySize=scanner.nextInt();
        System.out.println("输入页面引用串数量:");
        pageReferenceNumber=scanner.nextInt();
        System.out.println("输入执行的指令地址：");
        address= RequestPageUtil.generateSpecialPages(pageReferenceNumber);
        System.out.println("输入结束");
    }
}
